[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 norm()                  Calculate the Square of the Absolute Value

 #include   <complex.h>

 double norm(z);
 complex z;     Complex number.

        The norm() function is used to find the square of the absolute
        value of a complex number. norm() can overflow if the real or
        imaginary part is too large.

       Returns:     Returns the square of the absolute value.

   -------------------------------- Example ---------------------------------
        This example finds the norm of (5.9, 3.7).

        #include <complex.h>
        #include <iostream.h>

        int main(void)
        {
          double x = 5.9, y = 3.7;
          complex z = complex(x,y);
          double mag = sqrt(norm(z));
          return 0;
        }

See Also: arg() complex() polar()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson